package com.csylh.service.impl;

import com.csylh.dao.WasteInfoMapper;
import com.csylh.entity.WasteInfo;
import com.csylh.service.WasteInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 留歌
 * Date: 2018/3/12 23:30
 * Description:
 */
@Service("wasteInfoService")
public class WasteInfoServiceImpl implements WasteInfoService {

    @Autowired
    private WasteInfoMapper wasteInfoMapper;
    /**
     * 根据废品的类目查询对应的废品信息
     * @param type
     * @return List<WasteInfo>
     */
    @Override
    public List<WasteInfo> getWasteInfoByType(Integer type) {
        return wasteInfoMapper.selectWasteByType(type);
    }
    /**
     * 查询所有商品列表
     * @return
     */
    @Override
    public List<WasteInfo> findAll() {
        return wasteInfoMapper.findAll();
    }
}
